<%
  title_str = material.title
  if !material.sub_title.nil? && material.sub_title != ""
    title_str += " : #{material.sub_title}"
  end

  authors_str = ""
  author = material.authors.first
  if !author.nil?
    authors_str += "#{author.last_name} , #{author.first_name}"
  end

  publishers_str = ""
  publisher = material.publishers.first
  if !publisher.nil?
    publishers_str = "#{publisher.name}, #{publisher.city.name}"
    if !material.edition_year.nil? && material.edition_year != 0
      publishers_str += ", #{material.edition_year}"
    end
  end

  descriptors_str = ""
  material.descriptors.each do |descriptor|
    descriptors_str += "/#{descriptor.description}"
  end
%>

<%= "#{index}. #{authors_str}. #{title_str}. #{publishers_str}."%>
<br/>
<% if material.isbn != "" %>
  <%="ISBN #{material.isbn}" %>
  <br/>
<% end %>
<%="#{t('activerecord.attributes.material.comment')}. #{material.comment}"%>
<br/>
<%= descriptors_str %>
<br/>
<%="#{material.currency.symbol} #{"%.2f" % material.price}" %>
